import request from '@/util/request'

// 获取发票统计数据
export function getInvoiceStatistics() {
  return request({
    url: '/api/passenger/queryTheInvoicingStatistics',
    method: 'get'
  })
}

// 获取开票记录列表
export function getInvoiceList(pageNum = 1, pageSize = 10) {
  return request({
    url: `/api/passenger/queryInvoiceIssuingRecord?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: 'get'
  })
}

// 查询可开票订单列表
export function getInvoiceableOrders(pageNum = 1, pageSize = 10) {
  return request({
    url: `/api/passenger/queryOrderThatCanBeInvoiced`,
    method: 'get',
    params: {
      pageNum,
      pageSize
    }
  })
}

// 提交发票信息
export function submitInvoiceInfo(data) {
  return request({
    url: '/api/passenger/fillInBillingInformation',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: JSON.stringify(data)
  })
} 